package cn.yh.biz;

import java.util.HashMap;
import java.util.Map;

import org.apache.ibatis.session.SqlSession;

import cn.yh.dao.IUserDao;
import cn.yh.factory.SqlSessionFactoryUtil;
import cn.yh.model.User;

public class UserBiz {
	

	public User userLogin(String name, String pwd) {
		SqlSession session = SqlSessionFactoryUtil.getSqlSession();
		IUserDao userDao = session.getMapper(IUserDao.class);
		Map<String,Object> map = new HashMap<String,Object>();
		map.put("name", name);
		map.put("pwd", pwd);
		User user = userDao.userLogin(map);
		return user;

	}
}
